.GOLF
.BY BOB HENSEL

 100 for Z=1to N;@(Z)=0;next Z;B=0;for H=1to 9;gosub 3600
 102 for P=1to N;U=0;J=0
 104 if P=1G=13+rnd (50);I=15+rnd (15);T=13+rnd (50);R=13+rnd (50);S=13+rnd (50);B=B+Idiv 5
 105 clear ;gosub 1000;Y=-16;gosub 1100;T=T+18;gosub 1100;T=T-18;Y=0;gosub 1200
 106 Y=10;gosub 1300;E=40;F=-41;box E,F,1,1,1
 142 line 3,-43,4;line 3,43,1;line 79,43,1;line 79,-43,1;line 3,-43,1
 144 print "   HOLE #",#1,H;print " PAR ",#1,Idiv 5," ",#1,Imul 20,"YD
 146 W=rnd (4);M=(rnd (6)-1)mul 5;print " WIND:",;TV=93+W;print #3,M,"MPH",
 147 CY=8;CX=-71;print "PLAYER SCORE",
 148 CX=-56;CY=0;print #1,P,#7,U
 150 A=A+JX(1);if A>16A=1
 151 if A<1A=16
 152 X=2;Y=2;gosub 800+A
 153 line -40,-20,4;box -40,-20,60,30,2;box -40,-20,2,2,1;line Xmul 7-40,Ymul 7-20,1
 155 C=C+JY(1);if C>9C=1
 156 if C<1C=9
 170 CX=-71;CY=-40;print "CLUB:",#1,C,;if C=1print " WOOD",;goto 180
 172 print " IRON",
 180 if TR(1)=0goto 150
 200 U=U+1;NT=10;MU=C;NT=0
 202 if J=1goto 3100
 205 for Z=1to 2mul (10-C)
 210 if Z#11goto 219
 212 D=0;if M>5D=1
 214 if W=1Y=Y+D
 216 if W=2X=X-D
 217 if W=3Y=Y-D
 218 if W=4X=X+D
 219 E=E+X;F=F+Y;box E,F,1,1,3
 220 if E>3if E<79if F<43if F>-43J=0;goto 240
 230 goto 4000
 240 if E>G-9if E<G+8if F>I-8if F<I+8J=1
 250 if J=0if PX(E,F)=0goto 4000
 290 next Z
 291 if J=1goto 3000
 295 goto 148
 801 Y=0;return 
 802 Y=1;return 
 803 return 
 804 X=1;return 
 805 X=0;return 
 806 X=-1;return 
 807 X=-2;return 
 808 X=-2;Y=1;return 
 809 X=-2;Y=0;return 
 810 X=-2;Y=-1;return 
 811 X=-2;Y=-2;return 
 812 X=-1;Y=-2;return 
 813 X=0;Y=-2;return 
 814 X=1;Y=-2;return 
 815 Y=-2;return 
 816 Y=-1;return 
1000 box G,I,4,12,1;box G,I,10,10,1;box G,I,14,8,1;box G,I,16,4,1;return 
1100 box T,Y,2,10,1;box T,Y+2,4,2,1;box T,Y,6,2,1;box T,Y-2,8,2,1;return 
1200 box R,Y,2,18,1;box R,Y,6,14,1;box R,Y,10,10,1;box R,Y,14,6,1;box R,Y,18,2,1;return 
1300 box S,Y,12,5,1;return 
3000 box 41,0,78,87,2;box 41,0,16,48,1;box 41,0,40,40,1;box 41,0,56,32,1;box 41,0,72,16,1
3010 K=20+rnd (36);L=rnd (16)-8;box K,L,3,3,2;E=41+(E-G)mul 4;F=(F-I)mul 4;box E,F,1,1,3;box 41,0,79,84,3
3015 if ABS(E-K)<2if ABS(F-L)<2goto 3500
3017 goto 148
3100 for Z=1to 2mul (10-C)
3110 E=E+X;F=F+Y;box E,F,1,1,3
3120 if ABS(E-K)<2if ABS(F-L)<2goto 3500
3130 if E>3if E<79if F<43if F>-43goto 3140
3135 goto 4000
3140 next Z;goto 148
3500 CY=0;CX=30;print "SUNK!";@(P)=@(P)+U
3510 gosub 3610;next P;next H
3600 clear ;print " PAR=",#1,B;for Z=1to N;print " PLAYER",#2,Z,"=",#1,@(Z),#4,@(Z)-B;next Z
3610 for O=1to 1000;next O;return 
4000 CY=-20;CX=-59;print "PENALTY";NT=40;MU=60;MU=60;MU=60;NT=0;U=U+1;gosub 3610;goto 148

.STANDBY for INSTRUCTIONS
.GOLF -BY BOB HENSEL
.ALL GOLF RULES APPLY
.JX(1) for BALL ANGLE
.JY(1) for CLUB 1 to 9
.TR(1) to HIT THE BALL
.WIND WILL AFFECT BALL
.input # OF PLAYERS
:return ;NT=0;BC=25;FC=92;&(0)=170;&(1)=170;&(2)=7;&(3)=7;input N;&(9)=20;goto 100